// this is backend interface
const http = require('http');
const { couldStartTrivia } = require('typescript');

let server = http.createServer()
server.on('request', (req, res) => {
    let url = req.url;
    console.log(url)
    if(url == '/api') {
        res.setHeader('Content-Type','text/json')
        let send = JSON.stringify({
            hello:'world'
        })
        res.write(send)
    }
    res.end()
})

server.listen(666)